package com.zbf.auth.user;

import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import javax.persistence.*;
import java.util.Date;

/**
 * 作者: LCG
 * 日期: 2020/5/31 17:43
 * 描述: 用户实体类
 */
@Table(name = "base_user")
@Entity
@Data
@EntityListeners(AuditingEntityListener.class)
public class User{

    @Id
    @Column(name = "id")
    private Long id;

    @Column(name = "userName")
    private String userName;

    @Column(name = "passWord")
    private String passWord;

    @Column(name = "loginName")
    private String loginName;

    @Column(name = "salt")
    private String salt;

    @CreatedDate
    @Column(name = "createTime")
    private Date createTime;

    @LastModifiedDate
    @Column(name="updateTime")
    Date updateTime;

    @Version
    @Column(name = "version")
    private Long version;

    @Column(name = "tel")
    private String tel;


    @Column(name = "mail")
    private String mail;

    @Column(name = "active")
    private int active;

}
